home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_parent.move_play)
- {
- if(ishit)
- {
- if(this.hit.hitTest(_parent.hero.Hit))
- {
- _parent.canPlay = false;
- _parent.player_move = false;
- _parent.hero.gotoAndStop("die");
- }
- g += _parent.GGG;
- this._x += speedX;
- sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
- this._y = _parent.Hit._y + 40 - sn * dis;
- if(g % 360 == 90 || g % 360 == 270)
- {
- dis = 150;
- }
- if(this.hitTest(_parent.hit_L))
- {
- speedX = 4 + zzz_num;
- }
- if(this.hitTest(_parent.hit_R))
- {
- speedX = -4 + (- zzz_num);
- }
- }
- }
- if(Att_hit)
- {
- if(this.hitTest(_parent.arrow_1.hit))
- {
- ishit = false;
- _parent.arrow_1.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_2.hit))
- {
- ishit = false;
- _parent.arrow_2.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_3.hit))
- {
- ishit = false;
- _parent.arrow_3.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_4.hit))
- {
- ishit = false;
- _parent.arrow_4.gotoAndStop(1);
- _parent.sssmball11._x = this._x + 10;
- _parent.sssmball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_5.hit))
- {
- ishit = false;
- _parent.arrow_5.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_7.hit))
- {
- ishit = false;
- _parent.arrow_7.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- if(this.hitTest(_parent.arrow_8.hit))
- {
- ishit = false;
- _parent.arrow_8.gotoAndStop(1);
- _parent.sssball11._x = this._x + 10;
- _parent.sssball12._x = this._x - 10;
- this.play();
- }
- }
- }
-